import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { AssetsComponent } from './pages/assets/assets.component';
import { AssetsDetailComponent } from './pages/assets-detail/assets-detail.component';
import { FinancialDetailComponent } from './pages/financial-detail/financial-detail.component';
import { FinancialComponent } from './pages/financial/financial.component';
const routes: Routes = [
    {
        path: 'assets',
        component: AssetsComponent,
        data: { breadcrumbs: [{ title: '资产管理' }] },
        children: [
            {
                path: 'detail/:id',
                component: AssetsDetailComponent,
                data: { breadcrumbs: [{ title: '资产管理列表', path: '/fullname/inventory' }, { title: '资产详情' }] },
            },
            {
                path: 'detail',
                component: AssetsDetailComponent,
                data: { breadcrumbs: [{ title: '资产管理列表', path: '/fullname/inventory' }, { title: '添加资产' }] },
            },
        ]
    },
    {
        path: 'financial',
        component: FinancialComponent,
        children: [
            {
                path: 'detail', component: FinancialDetailComponent, data: {
                    breadcrumbs: [{ title: '财务管理列表', path: '/fullname/reported' }, { title: '添加财务' }]
                },
            },
            {
                path: 'detail/:id', component: FinancialDetailComponent, data: {
                    breadcrumbs: [{ title: '财务管理列表', path: '/fullname/reported' }, { title: '财务详情' }]
                }
            },
        ],
        data: {
            breadcrumbs: [{ title: '库存报损列表' }]
        }
    },

];

export const declarationComponents = [
    AssetsComponent,
    AssetsDetailComponent,
    FinancialComponent,
    FinancialDetailComponent,
];

export const entryComponents = [
];

@NgModule({
    imports: [
        RouterModule.forChild(routes)
    ],
    exports: [
        RouterModule
    ]
})
export class AssetsRoutingModule { }
